import processing.core.*;
import java.sql.*;
import java.util.Properties;

public class MyProcessingSketch extends PApplet{

	public void setup() {
	    size(400,200);
	    background(0);
	    
Properties p = new Properties();
		
		String url = "jdbc:mysql://SQL09.FREEMYSQL.NET:3306/retailm";
		p.put("user", "retailm");
		p.put("password", "cs440retailm");
		p.put("characterEncoding", "ISO-8859-1");
		
		try {
            DriverManager.registerDriver(new com.mysql.jdbc.Driver());
			Connection c = DriverManager.getConnection(url, p);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		System.out.print("  Connected as         -> " + p.getProperty("user") + "\n");
	  }

	  public void draw() {
		
		
		
	    stroke(255);
	    if (mousePressed) {
	      line(mouseX,mouseY,pmouseX,pmouseY);
	    }
	  }

}
